<div class="content">

<div class="bm mdcp">
<h1>供应商管理</h1>

<div class="ttp cl">
<?php 
$partner = array(
	array('mod'=>'Partner','act'=>'index','ext'=>'&id=a','name'=>'供应商列表'),
	array('mod'=>'Partner','act'=>'edit','ext'=>'','name'=>'添加供应商'),
	array('mod'=>'Partner','act'=>'type','ext'=>'','name'=>'供应商类别'),
);
echo make_sub_nav($partner, $pageData['ActionName']);
?>
</div>




<?php if ($pageData['ActionName'] == 'edit'):?>

<div class="exfm">
<form method="post" action="?mod=Partner&act=new">

<table cellpadding="0" cellspacing="0">
<tbody><tr>
<th width="15%">商家名称:</th>
<td width="35%"><input name="name" class="px" type="text"></td>
<th width="15%">供应商分类:</th>
<td width="35%">
<select class="ps" id="partner_type_id" name="partner_type_id">
<?php 
		if (!empty($pageData['TypeList'])):
		foreach ($pageData['TypeList'] as $key => $val):
		//selected="selected"
		?>
		
		<option value="<?php echo $val['id']?>"><?php echo $val['name']?></option>
		<?php 
		endforeach;
		endif;
		?>
</select>
</td>
</tr>
<tr>
<th width="15%">用户名称:</th>
<td width="35%"><input name="username" class="px" type="text"></td>
<th width="15%">用户密码:</th>
<td width="35%"><input name="password" class="px" type="text"></td>
</tr>
<tr>
<th width="15%">商家网址:</th>
<td width="35%"><textarea name="web" id="web" class="pt"></textarea></td>
<th width="15%">商家电话:</th>
<td width="35%"><textarea name="tel" id="tel" class="pt"></textarea></td>
</tr>
<tr>
<th width="15%">商家地址:</th>
<td width="35%"><textarea name="address" id="address" class="pt"></textarea></td>

<th width="15%">营业时间:</th>
<td width="35%"><textarea name="operating_time" id="operating_time" class="pt"></textarea></td>
</tr>

<tr>
<th>&nbsp;</th>
<td colspan="3">
<button type="submit" class="pn" name="submit" id="submit" value="true"><strong>添加</strong></button>
</td>
</tr>
</tbody>
</table>
</form>
</div>

<?php else:?>

<h2 class="ptm">供应商列表</h2>
<form method="post" autocomplete="off" action="#">
<input name="formhash" value="f7269de7" type="hidden">
<table id="list_announce" class="dt" cellpadding="0" cellspacing="0">
	<thead>
		<tr>
			<th class="c"></th>
			<th>供应商名称</th>
			<th>供应商电话</th>
			<th>供应商地址</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		<?php 
		if (!empty($pageData['PartnerList'])):
		foreach ($pageData['PartnerList'] as $key => $val):
		?>
		<tr>
			<td><input value="<?php echo $val['partner_id']?>" class="pc" name="partner_id[]" type="checkbox"></td>
			<td><?php echo $val['name']?></td>
			<td><?php echo $val['tel']?></td>
			<td><?php echo $val['address']?></td>
			<td></td>
		</tr>
		<?php 
		endforeach;
		endif;
		?>
	
	
		<tr class="bbn">
			<td><label for="chkall"><input class="pc" id="chkall" name="chkall"
				onclick="checkall(this.form)" type="checkbox"> 删?</label></td>
			<td colspan="4">
			<button type="submit" class="pn" name="submit" id="submit"
				value="true"><strong>提交</strong></button>
			</td>
		</tr>
	</tbody>
</table>
</form>
<div class="pgs">
	<div class="pg">
	<a href="#" class="prev">&nbsp;&nbsp;</a>
	<a href="#">1</a><strong>2</strong>
	<a href="#" class="nxt">Next</a>
	</div>
</div>

<?php endif;?>


</div>

</div>
